package com.zhangyu.shadow.repair.delegate.history;

import com.zhangyu.shadow.repair.base.IStringDataConvert;
import com.zhangyu.shadow.repair.delegate.bean.CommonBean;
import com.zhangyu.shadow.repair.delegate.bean.VehicleBean;

import java.util.ArrayList;
import java.util.List;

import io.reactivex.disposables.Disposable;
import st.lib.base.delegate.mvp.BaseModel;
import st.lib.base.delegate.mvp.BasePresenter;
import st.lib.base.delegate.mvp.BaseView;
import st.lib.base.net.callback.IError;

/**
 * @author zhangyu
 * @date 2018/12/4
 */

public interface HistoryContract {
    interface View extends BaseView {
        void showHistoryList(List<VehicleBean> list);

        void showMaintainList(List<MaintainType> list);

        void showClassificationList(List<CommonBean> list);
    }

    interface Model extends BaseModel {
        Disposable getHistoryList(String content,
                                  IStringDataConvert<ArrayList<VehicleBean>> success,
                                  IError error);

        Disposable getMaintainType(IStringDataConvert<ArrayList<MaintainType>> success,
                                   IError error);

        Disposable getRepairType(IStringDataConvert<ArrayList<MaintainType>> success,
                                 IError error);

        Disposable getClassification(IStringDataConvert<ArrayList<CommonBean>> success,
                                     IError error);
    }

    abstract class Presenter extends BasePresenter {
        abstract void getHistoryList(
                List<String> busVmTypeName,
                List<String> classificationId,
                String depId,
                String code,
                String dateStart,
                String dateEnd,
                int busVmType,
                String minTime);

        abstract void getMaintainType();

        abstract void getRepairType();

        abstract void getClassification();
    }
}
